package com.aop.jingtai.daili.dao.impl;

import com.aop.jingtai.daili.dao.StudentDao;

/**
 * 代理人 代理对象   做其他业务，重复的 
 * @author My
 *
 */
public class StuentDaoproxy implements StudentDao{
	
	
	private StudentDaoImpl dao;
	

	public StuentDaoproxy(StudentDaoImpl dao) {
		this.dao = dao;
	}

	@Override
	public void sing(String name) {
		System.out.println("开启事务 打电话和老板确认价钱 时间");
		
		dao.sing("xx");
		
		System.out.println("提交事务 ");
		
		System.out.println("回滚事务");
	}

	@Override
	public void updateById(int id) {
		
		
		
		
	}

}
